﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace UserQuanXianManager
{
	public partial class GroupSelect : Form
	{
		public GroupSelect()
		{
			InitializeComponent();

			using (var context = new blackbirdEntities())
			{
				var allGroup = context.group;
				foreach (var gp in allGroup)
				{
					MyListBoxItem gpItem = new MyListBoxItem();
					gpItem.id = gp.idGroup.ToString();
					gpItem.Context = gp.Name;
					clbGroupItems.Items.Add(gpItem);
				}
			}
		}

		public CheckedListBox GetContain
		{
			get
			{
				return clbGroupItems;
			}
		}

		private void bt_ok_Click(object sender, EventArgs e)
		{
			this.DialogResult = System.Windows.Forms.DialogResult.OK;
			this.Close();
		}

		private void clbGroupItems_ItemCheck(object sender, ItemCheckEventArgs e)
		{

		}

		private void clbGroupItems_SelectedIndexChanged(object sender, EventArgs e)
		{

		}
	}
}
